package ca.llsutherland.squash.domain;

public class TimeSensitiveDomainObject extends DomainObject {

    private static final long serialVersionUID = 1L;

    private Clock displayDate;
    private Clock removeDate;
    private Administrator createdBy;
    
    public void setDisplayDate(Clock displayDate) {
        this.displayDate = displayDate;
    }

    public void setRemoveDate(Clock removeDate) {
        this.removeDate = removeDate;
    }
    
    public Clock getDisplayDate() {
        return displayDate;
    }

    public Clock getRemoveDate() {
        return removeDate;
    }

    public void setCreatedBy(Administrator createdBy) {
        this.createdBy = createdBy;
    }

    public Administrator getCreatedBy() {
        return createdBy;
    }
    
    public boolean isVisible() {
        return removeDate.hasPassed();
    }
}
